
;;(load-elpa "paredit-20110508")
(load-plugin "paredit")

(autoload 'paredit-mode "paredit"
  "Minor mode for pseudo-structurally editing Lisp code." t)
(add-hook 'c-mode-common-hook         (lambda () (paredit-mode +1)))
(add-hook 'go-mode-hook       	      (lambda () (paredit-mode +1)))
(add-hook 'perl-mode-hook             (lambda () (paredit-mode +1)))
(add-hook 'python-mode-hook           (lambda () (paredit-mode +1)))
(add-hook 'ruby-mode-hook             (lambda () (paredit-mode +1)))
(add-hook 'emacs-lisp-mode-hook       (lambda () (paredit-mode +1)))
(add-hook 'lisp-mode-hook             (lambda () (paredit-mode +1)))
(add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode +1)))
(add-hook 'scheme-mode-hook           (lambda () (paredit-mode +1)))
(add-hook 'clojure-mode-hook          (lambda () (paredit-mode +1)))
(add-hook 'slime-repl-mode-hook       (lambda () (paredit-mode +1)))
(add-hook 'nrepl-mode-hook            (lambda () (paredit-mode +1)))
(add-hook 'nrepl-interaction-mode     (lambda () (paredit-mode +1)))

(defun override-slime-repl-bindings-with-paredit ()
  (define-key slime-repl-mode-map
    (read-kbd-macro paredit-backward-delete-key) nil))

(add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit)  

(provide 'mod-paredit)
